<template>
	<view>
		<view>
			<scroll-view bindscrolltoupper="__e" :scrollIntoView="toView" :scrollTop="mainHeight" :scrollY="true"
				:style="'height:'+scrollHeight+';'+'padding-bottom:'+0+';'">
				<view id="chatBox" v-if="$root.g0>0">
					<view class="pl30 pt30 pb30 pr30 " :id="'txt'+item[$orig].id" v-for="(item,index) in $root.l0"
						wx:for-index="__i0__" :key="index">
						<view class="dsf jcc pb20 fz26 col999 ">{{item[$orig].created_at}}</view>
						<view class="dsf " v-if="item[$orig].source=='driver'">
							<image mode class="w50 h50 bdra50b " :src="otherUser.avatar"></image>
							<view class="bgfff ml24 bsbox maxWidth540 pt20 pb20 pl20 pr20 bdra10 fz30 col333 ">
								<block v-if="item[$orig].type==1">{{''+item[$orig].content+''}}</block>
								<block v-else>
									<view class="w320 maxHeight320 dsf alc jcc " v-if="item[$orig].type==2">
										<image class="w100b " mode="widthFix" :src="item[$orig].content"></image>
									</view>
									<block v-else>
										<view v-if="item[$orig].type==3">{{''+item.m0+''}}</view>
									</block>
								</block>
							</view>
						</view>
						<view class="dsf jcfe " v-if="item[$orig].source=='customer'">
							<view class="bgfff mr24 bsbox maxWidth540 pt20 pb20 pl20 pr20 bdra10 fz30 col333 ">
								<block v-if="item[$orig].type==1">{{''+item[$orig].content+''}}</block>
								<block v-else>
									<view class="w320 maxHeight320 dsf alc jcc " v-if="item[$orig].type==2">
										<image class="w100b " mode="widthFix" :src="item[$orig].content"></image>
									</view>
									<block v-else>
										<view v-if="item[$orig].type==3">{{''+item.m1+''}}</view>
									</block>
								</block>
							</view>
							<image mode class="w50 h50 bdra50b " :src="user.avatar"></image>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<view class="bgfff l0 b0 w100b " id="inputBox" :style="'padding-bottom:'+(isIPX?'40px':0)+';'">
			<view class="h100rpx dsf alc bsbox " style="padding:15rpx 0 15rpx 30rpx;">
				<image mode src="../../static/new/jia.png" style="width:54rpx;height:54rpx;margin-right:20rpx;"></image>
				<input :adjustPosition="true" :autoBlur="true"
					class="fz28 col333 bde8 h100b bdra10 bsbox pl20 pr20 fg1 " confirmType="send"
					:cursorSpacing="cursorSpacing" :placeholder="$root.m2" placeholderClass="col999"
					style="background-color:#f7f7f7;" type="text" v-model="content"></input>
				<view class="pl30 pr30 h100b dsf alc jcc col0083FE ">{{$root.m3}}</view>
			</view>
			<view class="overhide dsf alc bsbox pl20 pore b0 "
				:style="'transition:all .3s;background-color:#f7f7f7;'+'height:'+(navShow?'180rpx':'0')+';'">
				<view class="pl20 pr20 h100b dsif alc jcc flex-column mr-20 ">
					<view class="pl20 pr20 h80 bde8 dsif alc jcc flex-column bdra20 bgfff ">
						<image class="w40 h40 " mode="widthFix" src="../../static/new/img.png"></image>
					</view>
					<view class="fz24 col999 pt14 ">{{$root.m4}}</view>
				</view>
				<view class="pl20 pr20 h100b dsif alc jcc flex-column mr-20 ">
					<view class="pl20 pr20 h80 bde8 dsif alc jcc flex-column bdra20 bgfff ">
						<image class="w40 h40 " mode="widthFix" src="../../static/new/xiangji.png"></image>
					</view>
					<view class="fz24 col999 pt14 ">{{$root.m5}}</view>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				scrollHeight: 0,
				content: "",
				cursorSpacing: 0,
				list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
				mainHeight: 0,
				isIPX: !1,
				user: {},
				otherUser: {},
				opt: {},
				navShow: !1,
				toView: "",
				chatlist: [],
				page: 1,
				last_page: 0,
				systemInfo: {}
			}
		},
		onLoad() {

		},
		onShow() {

		},

		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.maxWidth540 {
		max-width: 540upx;
		overflow: hidden;
		word-break: break-all
	}

	.maxHeight320 {
		max-height: 320upx;
		overflow: hidden
	}
</style>